import {createStore, applyMiddleware} from 'redux'

import promiseMiddleware from 'redux-promise';

import rootReducer from '../reducers/index'

// const creatStoreWithMiddleware = applyMiddleware(ReduxPromise)(createStore)

export default function configStore(initialState) {
    // const store = creatStoreWithMiddleware(rootReducer, initialState);
    // return store
    const store = createStore(
        rootReducer,
        applyMiddleware(promiseMiddleware)
    );
    return store
}